
CC            = cc
ASM           = objasm                              

CCFlags       = -c -throwback -IC: -IOS: -zM
LinkFlags     = -m -o $@
ASMflags      = -ThrowBack -Stamp -quit -CloseExec

Libs          = C:o.Stubs OSLib:o.OSLib
Objects       = o.header o.module o.midi o.midisupp o.scheduler o.mcode \
                o.linearhndl o.100Hz o.instrument o.loadpatchs o.externsnd \
                o.midiport o.midi500 o.events

^.HBP10GM:  $(Objects)
              Link $(Linkflags) $(Objects) $(Libs)
              Modsqz -f -v $@

.c.o:;        $(CC) $(CCflags) $< -o $@
.s.o:;        $(ASM) $(ASMflags) -from $< -to $@

# Dynamic dependencies:
o.header:     cmhg.header
              cmhg cmhg.header -o o.header -throwback
o.module:     c.module h.midisupp h.midi h.scheduler h.linearhndl \
              h.mcode h.100Hz h.instrument h.loadpatchs h.externsnd \
              h.proto h.midiport h.events
o.midi:       c.midi h.midi h.tables h.mcode h.instrument h.proto \
              h.externsnd h.events
o.midisupp:   c.midisupp h.midisupp h.midi h.proto h.instrument
o.scheduler:  c.scheduler h.scheduler h.midi h.proto h.instrument
o.linearhndl: c.linearhndl
o.mcode:      s.mcode h.mcode
o.100Hz:      s.100Hz h.100Hz
o.midi500:    c.midi500 h.midi500 h.midi
o.instrument: c.instrument h.instrument h.midi h.mcode h.externsnd \
              h.proto h.events
o.loadpatchs: c.loadpatchs h.loadpatchs h.instrument h.midi h.proto
o.externsnd:  c.externsnd h.externsnd h.midi h.instrument h.proto
o.midiport:   c.midiport h.midiport h.proto h.midi h.events
o.events:     c.events h.events h.mcode h.proto
